package packageofjbxq;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import bingliandshuju.SingleDataofAll;
import bingliandshuju.SingleInformationofIllnessDetail;

import com.example.animaldoctor03.AllIllness;
import com.example.animaldoctor03.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class LiuXingBX extends Activity {
	
	private Button buttonoflxbxf = null;
	private TextView textoflxbx = null;
	private String liuxingbx = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.liuxingbx);
		
		buttonoflxbxf= (Button)findViewById(R.id.buttonoflxbxf);
		textoflxbx = (TextView)findViewById(R.id.textoflxbx);
		buttonoflxbxf.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				List<Object> listoflxbxf = new ArrayList <Object>();
				SingleDataofAll SDAoflxbxf = SingleDataofAll.getInstance();
				listoflxbxf = SDAoflxbxf.getListinformation();
				
				Bundle bundleoflxbxf = new Bundle();
				bundleoflxbxf.putSerializable("shuju", (Serializable) listoflxbxf);
				Intent intentoflxbxf = new Intent(LiuXingBX.this , AllIllness.class);
				intentoflxbxf.putExtras(bundleoflxbxf);
				startActivity(intentoflxbxf);
				finish();
				
			}
		});
		
		SingleInformationofIllnessDetail SIIDoflxbx = SingleInformationofIllnessDetail.getInstance();
		liuxingbx =	SIIDoflxbx.getliuxingbx();
		Message msgoflxbx = new Message();
		msgoflxbx.what = 1;
		handleroflxbx.sendMessage(msgoflxbx);
		
		
	}
	public Handler handleroflxbx = new Handler(){


		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
		
			if(msg.what == 1){
				
				textoflxbx.setText("      流行病学             " + '\n' + '\n' + liuxingbx);
			}
		}
		
		
	};
		
		
}

